﻿@model Zatify.WebUI.Models.UserProfileBusinessesDetailsViewModel
@{
    ViewBag.Title = "Business Details";
    Layout = "~/Views/Shared/_MainLayout.cshtml";
}

<div class="wrapper">
    <!--inner container-->
    <div class="inner_container">
        <h2>@Model.Business.BusinessName
            <p class="sub_title_hd">
                @if (!String.IsNullOrEmpty(@Model.Business.BillingAddress1))
                { @Model.Business.BillingAddress1 }
                else
                { <text>&nbsp;</text> }
                <span class="distance">
                    @if (Model.Business.Distance.HasValue)
                    { 
                        @Model.Business.Distance.Value.ToString("0.00")<text>mi</text>
                    }
                    else
                    {
                        <text>N/A</text> 
                    }
                </span>
            </p>
        </h2>
        <div class="details_banner" style="text-align: center;">
            <img alt="" src="@Url.Action("GetBusinessPhoto", "UserProfile", new { businessId = Model.Business.BusinessId, w = 940, h = 350 })" />
        </div>
        <div class="z_deal_business_details_content">
            <div class="z_details_left">
                <div class="rating_price">
                    @InlineHelpers.FiveStarsRatingReadonly(Model.Business.Rating)
                    <span class="rating_text">@Model.Business.ReviewsCount
                        Reviews</span>
                    
                </div>
                <div class="items_category">
                    @*@if (Model.Business.Categories != null && Model.Business.Categories.Count() > 0)
                    {
                        @InlineHelpers.BusinessCategories(Model.Business.Categories)
                    }
                    else
                    {
                        <text>&nbsp;</text> 
                    }*@
                    @Model.Business.Description
                </div>
                <div class="items_category_business_hr">
                    @if (@Model.Business.StatusToday == "OPEN")
                    { 
                        <text> Hours Today: @Model.Business.HoursToday
                        <span class="business_hr_open">Open</span>
                        </text> 
                    }
                    else
                    {
                        <text><span class="business_hr_open" style="color: Red; padding-left: 0;">Closed</span></text> 
                    }
                </div>
                <div class="z_deal_price_bg">
                    <span class="z_deal_price">$$$</span>
                </div>
            </div>
            <div class="z_details_right">
                <div class="deal_details_contact_info">
                    <ul class="deal_contact_info">
                        <li><a href="#" class="phone_call">Call <span class="phone_call_no">@Model.Business.BusinessPhone</span><img
                            align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" /></a></li>
                        <li><a href="@Url.Action("BusinessDirection", "UserProfile", new { id = Model.Business.BusinessId }, "http")" class="directions">
                            Directions<img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" /></a></li>
                        <li><a href="@Url.Action("ActivePromotions", new { id = Model.Business.BusinessId })" class="">
                            View Current Promotions<img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" /></a></li>
                        <li><a href="@Url.Action("BusinessMoreInfo", new { id = Model.Business.BusinessId })" class="more_info">
                            More Info<br />
                            <span class="more_info_hr">Hours</span><img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" style="margin-top: -12px;" /></a></li>
                    </ul>
                </div>
                <div class="deal_details_line">
                    <a href="@Url.Action("CheckIn")" class="red_btn">Check - In</a>
                    @if (!Model.IsUserFavorite)
                    {
                        <a href="@Url.Action("FavoritesAdd", new { businessId = Model.Business.BusinessId })" class="red_btn" style="float: right;">
                            Add to Favorites</a>
                    }
                    else
                    {
                        <a href="@Url.Action("FavoritesDelete", new { businessId = Model.Business.BusinessId })" class="red_btn" style="float: right;">
                            Delete from Favorites</a>
                    }
                </div>
            </div>
        </div>
        <div class="clearfix">
        </div>
    </div>
    <!--end inner container-->
    <div class="clearfix">
    </div>
</div>
